import request from "@/utils/request";

const LOG_BASE_URL = "/v3/data/deviceData";

class deviceDataApi {




  /**
   * 批量转出设备
   *
   */
  static getHistoricalData(queryParams: GetHistoricalDataParams) {
    return request<any,histype>({
      url: `${LOG_BASE_URL}/getHistoricalData`,
      method: "post",
      headers: {
        "Content-Type": "application/json",
      },
      data: queryParams,
    });
  }
}

export default deviceDataApi;

// 参数接口
export interface GetHistoricalDataParams {
  /* */
  pages: {
    /* */
    current: number;

    /* */
    size: number;
    total: number;

    /* */
    startTime?: string;

    /* */
    endTime?: string;

    /* */
    orders?: {
      /* */
      column?: string;

      /* */
      asc?: boolean;
    }[];
  };

  /* */
  customerId: string;

  /* */
  deviceTypeId: string;

  /* */
  deviceCode?: string;
}

export interface histype{
  headers: any;
  data: any;
  current: number;
  pages: number;
  records: Array<any>;
  size: number;
  total: number;

}